package com.wj.rpsm.user.pojo.vo;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.wj.rpsm.user.pojo.Comment;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.time.LocalDateTime;
import java.util.List;

/**
 * @author WeiJin
 * @version 1.0
 */
@Data
@ApiModel("响应前端评论的vo")
public class CommentVo {
    @ApiModelProperty("评论人")
    private String username;
    @ApiModelProperty("评论id")
    private Integer comment_id;
    @ApiModelProperty("评论内容")
    private String comment_content;
    @ApiModelProperty("评论时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime comment_publish_time;
    @ApiModelProperty("评论者id")
    private Integer comment_userid;
    @ApiModelProperty("评论上一级id(消息)")
    private Integer comment_parent_message_id;
    @ApiModelProperty("评论上一级id(评论)")
    private Integer comment_parent_comment_id;
    @ApiModelProperty("评论点赞量")
    private Integer comment_like;
    @ApiModelProperty("评论总数")
    private Integer total;
    @ApiModelProperty("用户头像路径")
    private String user_avatar;
    @ApiModelProperty("二级评论")
    private List<CommentVo> childComments;
}
